package org.goodsl.mdd;

/**
 * Created with IntelliJ IDEA.
 * User: Simon Xiao
 * Date: 12-11-12
 * Time: 下午4:11
 * To change this template use File | Settings | File Templates.
 */
public class SingleValidResult<T> {

    public SingleValidResult(boolean isValid, String message, T variable, Validator<T> v){
        this.isValid = isValid;
        this.message = message;
        this.variable = variable;
        this.validator = v;

    }

    private boolean isValid;
    public boolean getIsValid(){
        return isValid;
    }

    private String message;
    public String getMessage(){
        return preMessage + message;
    }

    private String preMessage="";
    public String getPreMessage(){
        return preMessage;
    }
    protected void setPreMessage(String msg){
        preMessage = msg;
    }

    private T variable;
    public T getVariable(){
        return variable;
    }

    private Validator<T> validator;
    public Validator<T> getValidator(){
        return validator;
    }


}
